/*
 *  Arrow
 *
 *  Created by David Giovannini on 1/5/07.
 *  Copyright 2007 Software by Jove. All rights reserved.
 *
 */
 
#ifndef SBJ_Arrow_NULLDispatcher_h
#define SBJ_Arrow_NULLDispatcher_h

#include "SBJ/Arrow/IDispatcher.h"
#include "SBJ/Arrow/Subscription.h"

namespace SBJ
{

namespace Arrow
{

class NULLDispatcher : public IDispatcher
{
public:
	typedef boost::shared_ptr< NULLDispatcher > Ptr;
	
	virtual void onMessage( Message& )
	{
	}

	virtual bool subscribe( const Subscription& subscription )
	{
		subscription.getTopic().addUse();
		return true;
	}
	
	virtual bool unsubscribe( const Subscription& subscription )
	{
		subscription.getTopic().removeUse();
		return true;
	}
};

}

}

#endif